if (self.CavalryLogger) { CavalryLogger.start_js(["axlNP"]); } __d("ChannelConnectionEvents",[],(function(a,b,c,d,e,f){e.exports={CONNECTED:"chat-connection/connected",RECONNECTING:"chat-connection/reconnecting",SHUTDOWN:"chat-connection/shutdown",MUTE_WARNING:"chat-connection/mute",UNMUTE_WARNING:"chat-connection/unmute"}}),null); __d("ChannelConnection",["Arbiter","ArbiterMixin","ChannelConnectionEvents","ChannelConstants","ChannelManager","JSLogger","Run","SystemEvents","Visibility","clearTimeout","emptyFunction","mixin","setTimeoutAcrossTransitions"],(function(a,b,c,d,e,f){__p&&__p();var g=b("JSLogger").create("channel_connection"),h=null,i=null,j=null,k=null,l=0;a.__comet_ssr_is_server_env_DO_NOT_USE!==!0&&b("ChannelManager").startChannelManager();c=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c,d;for(var e=arguments.length,f=new Array(e),g=0;g1};d.isShutdown=function(){return k===m.SHUTDOWN};d.reconnect=function(a){a===void 0&&(a=!1);if(b("ChannelManager").state==="ping"||b("ChannelManager").state==="pull"||b("ChannelManager").isShutdown())return;g.log("reconnect",{now:a});m.inform(m.RECONNECTING,0);a?(h!==null&&(b("clearTimeout")(h),h=null),b("ChannelManager").enterState("ping!")):h||(h=b("setTimeoutAcrossTransitions")(function(){b("ChannelManager").enterState("ping!"),h=null},b("ChannelConstants").CHANNEL_MANUAL_RECONNECT_DEFER_MSEC));b("ChannelManager").resetDelay()};d.mockAfterLoad=function(){s(),t()};return c}(b("mixin")(b("ArbiterMixin")));var m=new c();b("Run").onBeforeUnload(b("emptyFunction"),!1);function n(){i&&(b("clearTimeout")(i),i=null)}function o(){n(),g.log("unmute_warning"),m.inform(m.UNMUTE_WARNING)}function p(a){n(),i=b("setTimeoutAcrossTransitions")(o,a),g.log("mute_warning",{time:a}),m.inform(m.MUTE_WARNING)}function q(){j&&(b("clearTimeout")(j),j=null)}function r(a,c){__p&&__p();q();if(a===b("ChannelConstants").ON_ENTER_STATE&&(c.nextState||c.state)==="pull"){if(k!==m.CONNECTED){g.log("connected");var d=!k;k=m.CONNECTED;l=0;m.inform(m.CONNECTED,{init:d})}}else a===b("ChannelConstants").ON_ENTER_STATE&&((c.nextState||c.state)==="ping"||!c.nextState&&c.state==="idle")?j=b("setTimeoutAcrossTransitions")(function(){var b=null;c.state==="idle"&&!c.nextState||(b=c.delay||0);g.log("reconnecting",{delay:b});m.disconnected()&&g.log("reconnecting_ui",{delay:b});k=m.RECONNECTING;c.state==="idle"&&l++;l>1?m.inform(m.RECONNECTING,b):!c.nextState&&c.state==="idle"&&r(a,c)},500):a===b("ChannelConstants").ON_SHUTDOWN&&(g.log("shutdown",{reason:c.reason}),k=m.SHUTDOWN,l=0,m.inform(m.SHUTDOWN,c.reason))}function s(){b("ChannelManager").isShutdown()?r(b("ChannelConstants").ON_SHUTDOWN,b("ChannelManager")._shutdownHint):r(b("ChannelConstants").ON_ENTER_STATE,{state:b("ChannelManager").state,nextState:b("ChannelManager").nextState,delay:0}),b("Visibility").addListener(b("Visibility").VISIBLE,m.reconnect)}b("Run").onAfterLoad(s);function t(){b("Arbiter").subscribe([b("ChannelConstants").ON_ENTER_STATE,b("ChannelConstants").ON_SHUTDOWN],r),b("Arbiter").subscribe(b("ChannelConstants").ATTEMPT_RECONNECT,function(){m.disconnected()&&m.reconnect()}),b("SystemEvents").subscribe(b("SystemEvents").TIME_TRAVEL,function(){m.reconnect(),p(b("ChannelConstants").MUTE_WARNING_TIME_MSEC)}),b("Run").onBeforeUnload(q,!1)}b("Run").onAfterLoad(t);b("Arbiter").subscribe(b("JSLogger").DUMP_EVENT,function(a,b){b.channel_connected=!m.disconnected()});e.exports=m}),3); __d("BuddyListNub",["csx","cx","fbt","Arbiter","AsyncRequest","AvailableList","BootloadedComponent.react","ChannelConnection","ChatOptions","ChatSidebarActions","ChatSidebarStore","ChatSidebarVisibility","ChatVisibility","CSS","Dock","DOM","Event","JSLogger","JSResource","KeyboardShortcuts","Keys","NubController","OrderedFriendsList","Parent","PresencePrivacy","PresenceStatus","PresenceUtil","React","ReactDOM","Run","Style","Toggler","emptyFunction","intlNumUtils","translateKey"],(function(a,b,c,d,e,f,g,h,i){__p&&__p();var j=40,k=253,l="277px",m=b("JSLogger").create("buddylist_nub");a=function(a){"use strict";__p&&__p();babelHelpers.inheritsLoose(c,a);function c(c,d,e,f){__p&&__p();var g;g=a.call(this)||this;a.prototype.init.call(babelHelpers.assertThisInitialized(g),c);g.root=c;g.orderedList=d;g.button=b("DOM").find(c,"a.fbNubButton");g.unreadCount=b("DOM").find(c,"span._5ayx");g.label=b("DOM").find(c,"span.label");g.buddyListTitle=b("DOM").find(c,".titlebarTextWrapper");g.body=b("DOM").scry(c,"div.fbNubFlyoutBody")[0];g.container=b("Parent").bySelector(c,"._56ox");var h=b("DOM").find(c,"div.fbNubFlyoutTitlebar");b("Toggler").createInstance(h).setSticky(!1);b("Toggler").createInstance(c).setSticky(!0);var j=b("DOM").scry(c,"._7oue");f&&b("Run").onAfterLoad(function(){g.dropdown=b("ReactDOM").render(b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("ChatSidebarDropdown.react").__setRef("BuddyListNub"),onToggleSidebar:function(){},sidebarType:"buddylist"}),f)});d.subscribeOnce("render",g.flyoutContentChanged.bind(babelHelpers.assertThisInitialized(g)));b("Run").onAfterLoad(function(){__p&&__p();var a=b("DOM").find(h,"div._4k48");a&&b("ReactDOM").render(b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("ChatSidebarComposeLink.react").__setRef("BuddyListNub"),className:"_3a-4"}),a);a=b("DOM").find(g.button,"div._1us9");a&&b("ReactDOM").render(b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("ChatSidebarComposeLink.react").__setRef("BuddyListNub"),className:"_3a-4"}),a);a=b("DOM").find(g.button,"div._1usa");a&&b("ReactDOM").render(b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("ChatSidebarDropdown.react").__setRef("BuddyListNub"),onToggleSidebar:function(){},sidebarType:"buddylist_nub"}),a);a=b("DOM").find(h,"div._3gl7");a&&b("ReactDOM").render(b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("ChatSidebarGroupCreateButtonReactComponent").__setRef("BuddyListNub")}),a);a=b("DOM").find(g.button,"div._3gll");a&&b("ReactDOM").render(b("React").createElement(b("BootloadedComponent.react"),{bootloadPlaceholder:b("React").createElement("span",null),bootloadLoader:b("JSResource")("ChatSidebarGroupCreateButtonReactComponent").__setRef("BuddyListNub"),className:"newGCF"}),a)});d.setScrollContainer(g.body);b("AvailableList").subscribe("buddylist/availability-changed",g._updateCount.bind(babelHelpers.assertThisInitialized(g)));b("Arbiter").subscribe("chat/connect",function(){return g._handleConnect(!0)});b("Arbiter").subscribe("chat/option-changed",function(a,b){b.name=="hide_groups"?this.onResize():b.name==="hide_buddylist"&&(b.value?this.hide():this.show())}.bind(babelHelpers.assertThisInitialized(g)));b("ChannelConnection").subscribe(b("ChannelConnection").CONNECTED,function(){return g._updateView()});b("ChannelConnection").subscribe(b("ChannelConnection").SHUTDOWN,function(){return g._updateView()});b("ChannelConnection").subscribe(b("ChannelConnection").RECONNECTING,function(){return g._updateView()});b("ChannelConnection").subscribe([b("ChannelConnection").MUTE_WARNING,b("ChannelConnection").UNMUTE_WARNING],function(){return g._updateView()});g.subscribe("show",g.onShow.bind(babelHelpers.assertThisInitialized(g)));g.subscribe("hide",g.onHide.bind(babelHelpers.assertThisInitialized(g)));g.subscribe("resize",g.onResize.bind(babelHelpers.assertThisInitialized(g)));b("Event").listen(c,"keydown",g._onKeyDown.bind(babelHelpers.assertThisInitialized(g)));b("Event").listen(g.button,"click",g.onButtonClick.bind(babelHelpers.assertThisInitialized(g)));b("KeyboardShortcuts").register("q",function(a){g._isOpen||(g.onButtonClick(),g.show()),a.prevent()},{persistOnTransition:!0,shortcutInfo:{displayKeys:[b("translateKey")("q")],description:i._("Search Messenger contacts")}});b("Arbiter").subscribe("minisidebar/show",g.hide.bind(babelHelpers.assertThisInitialized(g)));b("Arbiter").subscribe("sidebar/visibility",function(a,b){b?g.hide():g._onSidebarHide()});b("Style").set(g.body,"min-height",l);b("Arbiter").subscribe("sidebar/typeahead/active",function(a,c){c?(g._typeaheadActive=!0,b("CSS").hide(g.body.parentNode),g.orderedList.hide(),g.onResize()):(g._typeaheadActive=!1,g.onResize(),b("CSS").show(g.body.parentNode),g.orderedList.show())});b("OrderedFriendsList").getList(function(a){b("ChatSidebarStore").isEnabled()&&b("ChatSidebarStore").getVisibleType()==="buddylist"&&!b("ChatOptions").getSetting("hide_buddylist")&&!b("ChannelConnection").disconnected()&&!b("PresencePrivacy").isUserOffline()&&a.length>0&&g.show(),b("Event").listen(h,"click",function(a){b("CSS").matchesSelector(a.target,".titlebarTextWrapper")&&g._syncHideBuddylist(!0)}),j.forEach(function(a){var c=this;b("Event").listen(a,"click",function(a){c._syncHideBuddylist(!0)})},babelHelpers.assertThisInitialized(g)),g._updateView(),m.log("buddylist_initialized")});return g}var d=c.prototype;d._handleVisibilityChange=function(){this._updateView(),b("ChatVisibility").isOnline()||this.hide()};d._updateView=function(a){__p&&__p();var c;if(!b("ChatVisibility").isOnline())a=i._("Chat");else if(b("ChannelConnection").disconnected())a=i._("{Chat} (Disconnected)",[i._param("Chat",i._("Chat"))]);else{var d=b("PresenceStatus").getOnlineCount();if(d){var e=b("DOM").create("span",{className:"count"},"("+b("intlNumUtils").formatNumberWithThousandDelimiters(d)+")");a=i._({"*":"{Chat} {number-available}"},[i._param("Chat",i._("Chat")),i._param("number-available",e,[0,d])])}else a=i._("Chat"),c=!0}this._setPresenceIcon();this._setUnread();this._setLabel(a,c);this._updateBuddyListTitle();this.buttonContentChanged()};d._updateBuddyListTitle=function(){__p&&__p();var a,c=i._("Chat"),d="_6d4h";if(!b("ChatVisibility").isOnline()||b("ChannelConnection").disconnected())a=b("DOM").create("div",{"class":d},c);else{var e=b("PresenceStatus").getOnlineCount(),f;e&&(d="_6d4h _6d4i",f=b("DOM").create("div",{"class":"_6d4j"},i._("{subTitle} online",[i._param("subTitle",b("intlNumUtils").formatNumberWithThousandDelimiters(e))])));e=b("DOM").create("div",{"class":d},c);f&&b("DOM").appendContent(e,f);a=e}d=this.buddyListTitle.textContent||this.buddyListTitle.innerText;if(a&&d!==a){c=this.buddyListTitle.cloneNode(!0);b("DOM").setContent(c,a);b("DOM").replace(this.buddyListTitle,c);this.buddyListTitle=c}};d._setPresenceIcon=function(){b("CSS").conditionClass(this.root,"offline",!b("ChatVisibility").isOnline()||b("ChannelConnection").disconnected())};d.onButtonClick=function(){if(!b("ChatSidebarStore").isInitialized())return!0;b("ChatSidebarVisibility").shouldShowSidebarIgnoreEnabled(null,function(a,c){c=b("ChatSidebarStore").isEnabled();!c&&a?b("ChatSidebarActions").enable("sidebar"):b("ChatSidebarActions").show(c&&a?"sidebar":"buddylist")})};d.onHide=function(){this._isOpen=!1,this._buddyListRenderSubscription&&(this.orderedList.unsubscribe(this._buddyListRenderSubscription),this._buddyListRenderSubscription=null),this._hideBuddyList(),b("Arbiter").inform("buddylist/hide")};d._onKeyDown=function(a){a=b("Event").getKeyCode(a);if(a===b("Keys").ESC&&!b("CSS").hasClass(this.root,"menuOpened")){this.hide();return!1}else a==b("Keys").RETURN&&b("ChatSidebarVisibility").shouldShowSidebarIgnoreEnabled(null,function(a,c){b("ChatSidebarActions").enable(a?"sidebar":"buddylist")})};d._onSidebarHide=function(a){var c=this;b("OrderedFriendsList").getList(function(a){b("ChatSidebarStore").isEnabled()&&!b("ChatOptions").getSetting("hide_buddylist")&&!b("ChannelConnection").disconnected()&&!b("PresencePrivacy").isUserOffline()&&a.lenth>0?c.show():c.hide()})};d.onResize=function(){var a=this._typeaheadActive?b("Dock").getMaxFlyoutHeight(this.root)-60:k;b("Arbiter").inform("buddyList/resized",a,"persistent");this._typeaheadActive?b("Style").set(this.body,"max-height","none"):b("Style").set(this.body,"max-height",l);a=Math.max(250,a);a=Math.floor(a/j);this.orderedList.setNumTopFriends(a,!1,"buddylist")};d._showBuddyList=function(){var a=this;this._buddyListRenderSubscription=this.orderedList.subscribe("render",function(){b("Style").get(a.body,"height")!=l&&b("Style").set(a.body,"height",l)});this.orderedList.show();m.bump("buddylist_show")};d._hideBuddyList=function(){this.orderedList.hide(),m.bump("buddylist_hide")};d.onShow=function(){this._isOpen=!0,b("ChannelConnection").disconnected()?(b("ChannelConnection").reconnect(),this._showBuddyList()):b("ChatVisibility").goOnline(this._showBuddyList.bind(this)),this._syncHideBuddylist(!1)};d._setLabel=function(a,c){var d=this.label.textContent||this.label.innerText;if(d!==a){d=this.label.cloneNode(!0);b("DOM").setContent(d,a);b("DOM").replace(this.label,d);this.label=d}this.throbber&&b("CSS").conditionShow(this.throbber,!!c)};d._setUnread=function(a){b("CSS").conditionShow(this.unreadCount,!!a)};d._updateCount=function(){this._updateView()};d._syncHideBuddylist=function(a){b("ChatOptions").setSetting("hide_buddylist",a,"buddylist"),new(b("AsyncRequest"))("/ajax/chat/settings.php").setHandler(b("emptyFunction")).setErrorHandler(b("emptyFunction")).setData({hide_buddylist:a,window_id:b("PresenceUtil").getSessionID()}).setAllowCrossPageTransition(!0).send()};return c}(b("NubController"));b("Arbiter").subscribe(b("JSLogger").DUMP_EVENT,function(a,c){c.buddylist_visible=b("ChatSidebarStore").getVisibleType()==="buddylist"});e.exports=a}),null); __d("NotificationURI",["BusinessURI.brands","URI","VideoPermalinkURI","isDevelopersURI","isFacebookURI"],(function(a,b,c,d,e,f){__p&&__p();a={localize:function(a){__p&&__p();try{a=b("BusinessURI.brands")(a)}catch(b){return a.toString()}var c=a.getSubdomain();c=a.getUnqualifiedURI().getQualifiedURI().setSubdomain(c);if(b("isDevelopersURI")(a)){a=c.getDomain().split(".");a.length>=2&&(a.splice(-2,1,"facebook")[0]==="workplace"&&c.setDomain(a.join(".")))}return c.toString()},snowliftable:function(a){if(!a)return!1;a=new(b("URI"))(a);var c=a.getQueryData();return b("isFacebookURI")(a)&&(b("VideoPermalinkURI").isValid(a)||"fbid"in c)},isVaultSetURI:function(a){return this._areEquals(a,"/ajax/vault/sharer_preview.php")},isAlbumDraftRecoveryDialogURI:function(a){return this._areEquals(a,"/ajax/photos/upload/overlay/")},isQuicksilverURI:function(a){return this._areEquals(a,"/games/quicksilver/spotlight/")},isDirectURI:function(a){return this._startsWith(a,"/direct/")},isIGAccountCreationURI:function(a){return this._areEquals(a,"/ads/growth/aymt/instagram/account-creation-dialog/")},_areEquals:function(a,c){if(!a)return!1;a=new(b("URI"))(a);return b("isFacebookURI")(a)&&a.getPath()===c},_startsWith:function(a,c){if(!a)return!1;a=new(b("URI"))(a);return b("isFacebookURI")(a)&&a.getPath().startsWith(c)}};e.exports=a}),null); __d("notificationListRendererIsStoryOnlyLiveVideoNotification",[],(function(a,b,c,d,e,f){"use strict";function a(a){a=a.renderer_data;return a==null?!1:a.__typename==="LiveVideoNotificationRendererData"&&!!a.bucket_data}e.exports=a}),null); __d("VideoChainingCaller",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({INTERNAL:"internal",WWW_FEED_PIVOTS:"www_feed_pivots",WWW_FEED_SNOWLIFT:"www_feed_snowlift",MISC_PHOTO_SET:"misc_photo_set",MOBILE:"mobile",SEARCH:"search",WWW_FEED_RHC:"www_feed_rhc",WWW_NOTIFICATION:"www_notification",WWW_PERMALINK:"www_permalink",WWW_PERMALINK_RHC:"www_permalink_rhc",WWW_PERMALINK_RHC_FROM_NOTIFICATION:"www_permalink_rhc_from_notification",MY_VIDEO_CHANNELS_ENT_QUERY:"my_video_channels_ent_query",TOP_FOLLOWED_VIDEO_CHANNELS_ENT_QUERY:"top_followed_video_channels_ent_query",BADGE:"badge",PAGINATION:"pagination",SUBTITLE:"subtitle",CHANNEL_VIEW_FROM_UNKNOWN:"channel_view_from_unknown",CHANNEL_VIEW_FROM_NEWSFEED:"channel_view_from_newsfeed",CHANNEL_VIEW_FROM_EXPLOREFEED:"channel_view_from_explorefeed",LIVE_INDEXER_FROM_EXPLOREFEED:"live_indexer_from_explorefeed",LIVE_INDEXER_FROM_NEWSFEED:"live_indexer_from_newsfeed",NN_INDEXER_FROM_NEWSFEED:"nn_indexer_from_newsfeed",CHANNEL_VIEW_FROM_SEARCH:"channel_view_from_search",CHANNEL_VIEW_FROM_NEWSFEED_PIVOT:"channel_view_from_newsfeed_pivot",NEWSFEED_PIVOT_INLINE:"newsfeed_pivot_inline",MOBILE_NEWSFEED_PIVOT_INLINE:"mobile_newsfeed_pivot_inline",CHANNEL_VIEW_FROM_PAGE_CALL_TO_ACTION:"channel_view_from_page_call_to_action",CHANNEL_VIEW_FROM_PAGE_TIMELINE:"channel_view_from_page_timeline",CHANNEL_VIEW_FROM_PAGE_TIMELINE_FEATURED:"channel_view_from_page_timeline_featured",CHANNEL_VIEW_FROM_PAGE_VIDEO_TAB:"channel_view_from_page_video_tab",CHANNEL_VIEW_FROM_PAGE_HOME_HERO:"channel_view_from_page_home_hero",CHANNEL_VIEW_FROM_USER_TIMELINE:"channel_view_from_user_timeline",CHANNEL_VIEW_FROM_USER_VIDEO_TAB:"channel_view_from_user_video_tab",CHANNEL_VIEW_FROM_GROUP_TIMELINE:"channel_view_from_group_timeline",CHANNEL_VIEW_FROM_GROUP_VIDEO_TAB:"channel_view_from_group_video_tab",CHANNEL_VIEW_FROM_VIDEO_PAGE_SPOTLIGHT:"channel_view_from_video_page_spotlight",CHANNEL_VIEW_FROM_VIDEO_PAGE_VIDEO_LIST:"channel_view_from_video_page_video_list",CHANNEL_VIEW_FROM_VIDEO_PAGE_VIDEO_TAB:"channel_view_from_video_page_video_tab",CHANNEL_VIEW_FROM_SAVED_STORY:"channel_view_from_saved_story",SAVED_STORY_INLINE:"saved_story_inline",CHANNEL_VIEW_FROM_SHARED_WITH_YOU_STORY:"channel_view_from_shared_with_you_story",SHARED_WITH_YOU_STORY_INLINE:"shared_with_you_story_inline",CHANNEL_VIEW_FROM_LATEST_FROM_YOUR_CHANNELS_STORY:"channel_view_from_latest_from_your_channels_story",LATEST_FROM_YOUR_CHANNELS_STORY_INLINE:"latest_from_your_channels_story_inline",CHANNEL_VIEW_FROM_CHANNEL_PIVOT:"channel_view_from_channel_pivot",CHANNEL_PIVOT_INLINE:"channel_pivot_inine",CHANNEL_VIEW_FROM_CHANNEL_RECOMMENDED_CHANNEL_STORY:"channel_view_from_recommended_channel_story",RECOMMENDED_CHANNEL_STORY_INLINE:"recommended_channel_story_inline",CHANNEL_VIEW_FROM_VIDEO_HOME:"channel_view_from_video_home",VIDEO_HOME_INLINE:"video_home_inline",VIDEO_HOME_CHANNEL_SEE_ALL:"video_home_channel_see_all",SOCIAL_PLAYER_UP_NEXT:"social_player_up_next",CHANNEL_VIEW_FROM_CASTING:"channel_view_from_casting",CONNECTED_TV:"connected_tv",CONNECTED_TV_DISCOVERY:"connected_tv_discovery",CONNECTED_TV_PLAYER:"connected_tv_player",CONNECTED_TV_PROFILE:"connected_tv_profile",VIDEO_HOME_FEED:"video_home_feed",VIDEO_HOME_HERO:"video_home_hero",FEED_SURVEY_SWIPE:"feed_survey_swipe",FEED_PIVOTS_INLINE:"feed_pivots_inline",CHANNEL_VIEW_FROM_FEED_PIVOTS:"channel_view_from_feed_pivots",VIDEO_SETS_CACHE_REFRESH:"video_sets_cache_refresh",VIDEO_SETS_CACHE_CHECK:"video_sets_cache_check",DUMMY_STORY_RECOMMENDED_VIDEOS:"dummy_story_recommended_videos",DUMMY_STORY_FRIENDS_ENJOYING:"dummy_story_friends_enjoying",LIVE_EVENT_VIDEO_SET:"live_event_video_set",LIVE_VIDEOS_SET:"live_videos_set",SINGLE_CREATOR_VIDEO_SET:"single_creator_video_set",FRT_TOOL:"frt_tool",DUMMY_STORY_FRIENDS_ENJOYING_NOW:"dummy_story_friends_enjoying_now",DUMMY_STORY_DUMMY_ACTION:"dummy_story_dummy_action",OCULUS_VIDEO:"oculus_video",TRENDING_DEMOGRAPHICS_LIVE:"trending_demographics_live",LIVE_MAP:"live_map",UNCONNECTED_LIVE_VIDEO:"unconnected_live_video",PROFILE_VIDEO_GALLERY:"profile_video_gallery",CHANNEL_VIEW_FROM_PLAYLIST:"channel_view_from_playlist",OCULUS_SOCIAL_HUB:"oculus_social_hub",AKIRA:"akira",IS_LIVE_VIDEO_CHAINING:"is_live_video_chaining",IS_LIVE_VIDEO_CHAINING_OTHERS:"is_live_video_chaining_others",VIDEO_CREATOR_CHAINING:"video_creator_chaining",TAHOE:"tahoe",LIVING_ROOM:"living_room",SHOWS_COVER_TRAILER:"shows_cover_trailer",SHOWS_EPISODES_TAB:"shows_episodes_tab",SHOWS_PLAYLISTS_TAB:"shows_playlists_tab",SHOWS_HOME_TAB:"shows_home_tab",SHOWS_MORE_VIDEOS_TAB:"shows_more_videos_tab",SHOW_EPISODE_FEED_RECOMMENDATIONS:"show_episode_feed_recommendations",PARENT_PAGE_TIMELINE:"parent_page_timeline",WATCH_WATCHLIST_TAB:"watch_watchlist_tab",WATCH_FEED_TAB:"watch_feed_tab",WATCH_INJECTION:"watch_injection",WATCH_TOPIC_FEED:"watch_topic_feed",WATCH_TOPIC_CHANNEL_FEED:"watch_topic_channel_feed",WATCH_SUBTOPIC_CHANNEL_FEED:"watch_subtopic_channel_feed",WATCH_SECTION_SEE_ALL:"watch_section_see_all",SOCIAL_PLAYER_FROM_VIDEO_HOME:"social_player_from_video_home",WATCH_CUSTOM_ADS:"watch_custom_ads",WNS:"wns",EXPLORE_FEED_DEEP_DIVE:"explore_feed_deep_dive",VOYAGER:"voyager",GAMES_VIDEO_CHANNEL:"games_video_channel",LOL_VIDEO_FEED:"lol_video_feed",AVD_VIDEO:"avd",LIVE_CHAINING:"live_chaining",LIVING_ROOM_CHAINING:"living_room_chaining",FBLITE_TRENDING_VIDEO:"fblite_trending_video",PORTAL:"portal",LASSO:"lasso",WATCH_SOCIAL:"watch_social",MESSENGER:"messenger",CHANNEL_VIEW_FROM_NEWSFEED_RELATED:"channel_view_from_newsfeed_related",CHANNEL_VIEW_FROM_VIDEO_HOME_RELATED:"channel_view_from_video_home_related",TEST:"test",UNKNOWN:"unknown"})}),null); __d("XLiveVideoLoadController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/live/video/load/",{video_id:{type:"FBID",required:!0}})}),null); __d("notificationListRendererOpenNotification",["AsyncRequest","Bootloader","NotificationURI","PageTransitions","URI","VideoChainingCaller","XLiveVideoLoadController","notificationListRendererIsStoryOnlyLiveVideoNotification"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function a(a,c){__p&&__p();var d=c.renderer_data;if(d==null)return;if(!b("notificationListRendererIsStoryOnlyLiveVideoNotification")(c)&&(a.metaKey||a.ctrlKey||a.button===1))return;if(d.__typename==="LiveVideoNotificationRendererData"){a.preventDefault();d=b("XLiveVideoLoadController").getURIBuilder().setFBID("video_id",d.video_id).getURI();d=new(b("AsyncRequest"))(d).setHandler(function(d){d.payload?g(a,c):b("PageTransitions").go(c.url)});d.send()}}function g(a,b){var c=b.renderer_data;if(c==null)return;c.bucket_data?h(a,c):c.can_render_in_tahoe&&i(a,c,b)}function h(a,c){b("Bootloader").loadModules(["FBStoriesLiveNotificationHandler"],function(a){a.renderLiveStory(c)},"notificationListRendererOpenNotification")}function i(a,c,d){b("Bootloader").loadModules(["TahoeController"],function(a){var e=b("NotificationURI").localize(new(b("URI"))(d.url)),f=c.video_channel_caller;a.openFromVideoLink(new(b("URI"))(e),{channelID:c.video_channel_id,caller:f?(a=b("VideoChainingCaller"))!=null?a[f]:a:null})},"notificationListRendererOpenNotification")}e.exports=a}),null); __d("FBPaymentsDialogStore",["FBPaymentsDialogActions","FBPaymentsDispatcher","FluxStore"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){var c;c=a.call(this,b("FBPaymentsDispatcher"))||this;c.$FBPaymentsDialogStore1={dialogClass:null,dialogProps:null};return c}var d=c.prototype;d.__onDispatch=function(a){var c=a.type;a=a.data;switch(c){case b("FBPaymentsDialogActions").types.SHOW_DIALOG:this.$FBPaymentsDialogStore1={dialogClass:a.dialogClass,dialogProps:a.dialogProps};this.__emitChange();break;case b("FBPaymentsDialogActions").types.HIDE_DIALOG:this.$FBPaymentsDialogStore1={dialogClass:null,dialogProps:null};this.__emitChange();break}};d.getState=function(){return this.$FBPaymentsDialogStore1};return c}(b("FluxStore"));a.__moduleID=e.id;e.exports=new a()}),null); __d("FBPaymentsDialogContainer.react",["FBPaymentsDialogStore","FBPaymentsDispatcher","FluxContainer","React"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(a){__p&&__p();babelHelpers.inheritsLoose(c,a);function c(){return a.apply(this,arguments)||this}c.calculateState=function(){return b("FBPaymentsDialogStore").getState()};c.getStores=function(){return[b("FBPaymentsDialogStore")]};var d=c.prototype;d.UNSAFE_componentWillMount=function(){b("FBPaymentsDispatcher").explicitlyRegisterStore(b("FBPaymentsDialogStore"))};d.render=function(){if(!this.state.dialogClass)return null;var a=this.state.dialogClass;return b("React").createElement(a,babelHelpers["extends"]({},this.state.dialogProps,{key:"dialog"}))};return c}(b("React").Component);e.exports=b("FluxContainer").create(a)}),null); __d("FBPaymentsDialogContainerMount",["FBPaymentsDialogContainer.react","React","ReactDOM"],(function(a,b,c,d,e,f){"use strict";a={mount:function(a){b("ReactDOM").render(b("React").createElement(b("FBPaymentsDialogContainer.react"),null),a)}};e.exports=a}),null); __d("XPymkFunnelLoggingController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/pymk/funnel_logging/",{event_ts:{type:"Int",required:!0},query_id:{type:"Int"},candidate_id:{type:"Int"},signature:{type:"Int"},loc:{type:"String",required:!0},ref:{type:"String"},action:{type:"Enum",required:!0,enumType:1}})}),null); __d("PymkFunnelLogger",["AsyncRequest","DOMQuery","XPymkFunnelLoggingController"],(function(a,b,c,d,e,f){__p&&__p();a={setupListeners:function(a,b,c,d,e){this._setupForSingleElement(a,b,c,"add"),this._setupForSingleElement(a,b,d,"click"),this._setupForSingleElement(a,b,e,"click")},logImpression:function(a,b,c){this._logEvent(a,"impression",b,c)},logXOut:function(a,b,c){this._logEvent(a,"hide",b,c)},_logEvent:function(a,c,d,e){a=b("XPymkFunnelLoggingController").getURIBuilder().setInt("candidate_id",a).setInt("signature",d).setInt("event_ts",Math.floor(Date.now()/1e3)).setEnum("action",c).setString("loc",e).getURI();new(b("AsyncRequest"))(a).setMethod("POST").send()},_setupForSingleElement:function(a,c,d,e){Event.listen(d,"click",function(d){d=a.getAttribute("data-signature");var f=b("DOMQuery").find(a,"input.friendBrowserID");f=parseInt(f.value,10);this._logEvent(f,e,d,c)}.bind(this))}};e.exports=a}),null); __d("XFriendRequestIHEventLoggingController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/requests/interaction_history_logging/",{target_id:{type:"FBID",required:!0},log_event:{type:"String",required:!0}})}),null); __d("FriendRequestIHEventLogger",["AsyncRequest","Event","XFriendRequestIHEventLoggingController"],(function(a,b,c,d,e,f){__p&&__p();a={setupJewelListeners:function(a,b,c){this._setupForJewelSingleElement(a,b,"click"),c&&this._setupForJewelSingleElement(a,c,"click")},logImpression:function(a){this._logEvent(a,"impression")},_logEvent:function(a,c){if(isNaN(a))return;a=b("XFriendRequestIHEventLoggingController").getURIBuilder().setFBID("target_id",a).setString("log_event",c).getURI();new(b("AsyncRequest"))(a).setMethod("POST").send()},_setupForJewelSingleElement:function(a,c,d){b("Event").listen(c,"click",function(b){b=a.getAttribute("id");if(b==null)return;b=b.substring(0,b.length-6);this._logEvent(b,d)}.bind(this))}};e.exports=a}),null); __d("WebFriendingRequests",["Arbiter","DOM","Event","FriendRequestIHEventLogger","MarauderLogger","PymkFunnelLogger","Vector","debounceCore"],(function(a,b,c,d,e,f){__p&&__p();a={init:function(a,c){__p&&__p();this._pymkBox=a;this._lastPymkSeen=-1;this._recordPYMKImpression();b("Event").listen(window,"scroll",b("debounceCore")(this._recordPYMKImpression.bind(this),100));b("Event").listen(window,"resize",b("debounceCore")(this._recordPYMKImpression.bind(this),100));b("Arbiter").subscribe("pymk-x-out",this._handleXout.bind(this));this._requestsBox=c;if(!this._requestsBox)return;this._lastRequestSeen=-1;this._recordFriendRequestImpression();b("Event").listen(window,"scroll",b("debounceCore")(this._recordFriendRequestImpression.bind(this),100));b("Event").listen(window,"resize",b("debounceCore")(this._recordFriendRequestImpression.bind(this),100))},_recordPYMKImpression:function(){__p&&__p();var a=b("DOM").scry(this._pymkBox,"li.friendBrowserListUnit"),c=b("Vector").getViewportDimensions().y,d=a.length-1;while(d>this._lastPymkSeen){var e=b("Vector").getElementPosition(a[d],"viewport").y;if(e>0&&e+b("Vector").getElementDimensions(a[d]).y<=c)break;d-=1}e=d;while(d>this._lastPymkSeen)this.logPYMKImpression(a[d],"friends_center"),d-=1;this._lastPymkSeen=Math.max(this._lastPymkSeen,e)},_recordFriendRequestImpression:function(){__p&&__p();var a=b("DOM").scry(this._requestsBox,"div.friendRequestItem"),c=b("Vector").getViewportDimensions().y,d=a.length-1;while(d>this._lastRequestSeen){var e=b("Vector").getElementPosition(a[d],"viewport").y;if(e>0&&e+b("Vector").getElementDimensions(a[d]).y<=c)break;d-=1}e=d;while(d>this._lastRequestSeen){c=a[d].getAttribute("data-id");var f={request_id:c,request_location:"friend_center_requests"};b("MarauderLogger").log("request_seen","friend_request_waterfall",f);b("FriendRequestIHEventLogger").logImpression(c);d-=1}this._lastRequestSeen=Math.max(this._lastRequestSeen,e)},_handleXout:function(){this._lastPymkSeen=Math.max(this._lastPymkSeen-1,-1),this._recordPYMKImpression()},logPYMKImpression:function(a,c){var d=b("DOM").find(a,"input.friendBrowserID");d=parseInt(d.value,10);a=parseInt(a.getAttribute("data-signature"),10);b("PymkFunnelLogger").logImpression(d,a,c)}};e.exports=a}),null); __d("JewelQPLogging",["QPRenderer"],(function(a,b,c,d,e,f){var g=!1,h=null,i=!1;function j(){if(i)return;g&&h&&(i=!0,b("QPRenderer").logEvent(String(h.promotion_id),"view",h.instance_log_data?h.instance_log_data:{}))}a={onJewelOpened:function(){g=!0,j()},updateQPLogData:function(a){h=a,j()}};e.exports=a}),null); __d("RequestsJewelStore",["Arbiter","ArbiterMixin","ChannelConstants"],(function(a,b,c,d,e,f){__p&&__p();a=babelHelpers["extends"]({},b("ArbiterMixin"),{_initialized:!1,_count:0,_requestList:{},addFriendRequests:function(a){Object.assign(this._requestList,a)},getRequestListKeys:function(){return Object.keys(this._requestList)},removeRequest:function(a){delete this._requestList[a]},getRequestCount:function(a){return this.getRequestListKeys().length},decrementCount:function(){this.setCount(Math.max(0,this._count-1))},setCount:function(a){b("Arbiter").inform("jewel/count-updated",{jewel:"requests",count:a},"state")},setupListeners:function(){__p&&__p();var a=this;if(this._initialized)return;this._initialized=!0;b("Arbiter").subscribe("jewel/count-updated",function(b,c){c.jewel==="requests"&&a._updateCount(c.count)});b("Arbiter").subscribe(b("ChannelConstants").getArbiterType("jewel_requests_add"),function(b,c){return a._addRequest(c)});b("Arbiter").subscribe(b("ChannelConstants").getArbiterType("jewel_friending_notifs"),function(b,c){return a._addNotification(c)});b("Arbiter").subscribe(b("ChannelConstants").getArbiterType("mobile_requests_count"),function(b,c){return a._updateBadgeCountFromObject(c)});b("Arbiter").subscribe(b("ChannelConstants").getArbiterType("jewel_requests_remove_old"),function(b,c){return a._removeOldRequest(c)});b("Arbiter").subscribe(b("ChannelConstants").getArbiterType("friend_requests_expired"),function(b,c){return a._refreshJewel(!0)});b("Arbiter").subscribe(b("ChannelConstants").getArbiterType("friend_requests_seen"),function(b,c){return a.setCount(0)})},_updateCount:function(a){var b=this._count!==a;this._count=a;b&&this.inform("countUpdated",a)},_addRequest:function(a){__p&&__p();if(!a)return;a=a.obj;var b=a.from;a=a.suggester;b=this._requestList[b];b||this.setCount(this._count+1);b=b?b.type:null;a=b===19&&!a;this.inform("addRequest",{shouldReplace:a,previousType:b})},_updateBadgeCountFromObject:function(a){if(!a)return;a=a.obj;a=a.num_unseen+a.num_friend_confirmed_unseen+a.num_expire_highlight_unseen;this._refreshJewel();this.setCount(a)},_addNotification:function(a){if(!a||a.obj.notif_type!=="friend_confirmed")return;this.inform("addNotification")},_removeOldRequest:function(a){if(!a)return;a=this._requestList[a.obj.from];if(!a)return;this.inform("removeOldRequest",a)},_refreshJewel:function(a){a===void 0&&(a=!1),this.inform("refreshJewel",a)}});e.exports=a}),null); __d("XExpireFriendRequestsMutationController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ajax/requests/expire/",{from_m_jewel:{type:"Bool",defaultValue:!1}})}),null); __d("XGigaboxxUpdateSeenTimeAsyncController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/ajax/gigaboxx/endpoint/writesafe/update_last_seen_time/",{})}),null); __d("RequestsJewelController",["invariant","Promise","Arbiter","AsyncRequest","CSS","DOM","DOMQuery","Event","EventProfiler","Focus","FriendRequestIHEventLogger","JewelQPLogging","MarauderLogger","Parent","RequestsJewelStore","ScrollableArea","TimeSlice","WebFriendingRequests","XExpireFriendRequestsMutationController","XGigaboxxUpdateSeenTimeAsyncController","ge","getElementPosition","getViewportDimensions","promiseDone","requireWeak","throttle"],(function(a,b,c,d,e,f,g){__p&&__p();var h=null;b("requireWeak")("FriendBrowserCheckboxController",function(a){return h=a});var i=31,j=600,k=30,l=160;a=function(){"use strict";__p&&__p();a.getInstance=function(){return this.$11};a.updateFromDOM=function(){var a=this.getInstance();a&&a.fromDom()};a.setupScroll=function(){var a=this.getInstance();a&&a.setupScroll()};a.setInitialHeight=function(){var a=this.getInstance();a&&a.updateHeight()};a.maybeLoadJewel=function(){var a=this.getInstance();a&&a.maybeLoadJewel()};a.isOpen=function(){var a=this.getInstance();return a?a.$2():!1};a.create=function(b,c){this.$11&&g(0,5550);return this.$11=new a(b,c)};a.setupJewelRefresh=function(){b("Arbiter").subscribe(["FriendRequest/confirmFromProfile","FriendRequest/deleteFromProfile"],function(a,c){a={};a.reloadcontent=!0;new(b("AsyncRequest"))().setURI("/ajax/requests/loader/").setData(a).setAllowCrossPageTransition(!0).send()})};function a(a,c){__p&&__p();var d=this;this.$2=c;this.$1=a;this.$4=-1;this.$5=-1;this.$10=b("Promise").resolve(!0);this.$8=function(a){var c=this;b("throttle").acrossTransitionsWithBlocking(function(){return c.$12(a)},5e3)()};b("RequestsJewelStore").subscribe("addRequest",this.$13.bind(this));b("RequestsJewelStore").subscribe("addNotification",function(){return d.$14()});b("RequestsJewelStore").subscribe("removeOldRequest",this.$15.bind(this));b("RequestsJewelStore").subscribe("refreshJewel",this.$16.bind(this));b("RequestsJewelStore").setupListeners();this.setupScroll();this.$17();this.$18();this.$19()}var c=a.prototype;c.fromDom=function(){var a=this,c={};b("DOMQuery").scry(this.$1,"li.objectListItem").forEach(function(b){b=b.getAttribute("id");if(b){b=a.$20(b);b&&b.requester&&(c[b.requester]=b)}});b("RequestsJewelStore").addFriendRequests(c);this.$21()};c.maybeLoadJewel=function(){var a=this;this.$9&&(this.$9(function(){a.openHandler()}),this.$9=null)};c.updateHeight=function(){var a=this.$22();a&&(a.style.height=this.$23()+"px")};c.markSeen=function(){b("promiseDone")(this.$10,function(){new(b("AsyncRequest"))(b("XGigaboxxUpdateSeenTimeAsyncController").getURIBuilder().getURI()).setMethod("POST").send()})};c.openHandler=function(){__p&&__p();!this.$6&&this.$2()&&(this.$6=!0,b("EventProfiler").tagCurrentActiveInteractionsAs("FirstRequestsJewelOpen"));b("Arbiter").inform("requestsJewel/opened");var a=b("ge")("fbRequestsJewelLoading"),c=this.$22();new(b("AsyncRequest"))().setURI(b("XExpireFriendRequestsMutationController").getURIBuilder().getURI()).send();if(!a&&!c)this.$9=b("TimeSlice").getGuardedContinuation("RequestsJewelController clickBeforeE2E continuation");else if(a)this.$8({log_impressions:!0});else{a=b("RequestsJewelStore").getRequestListKeys();a.length>0&&new(b("AsyncRequest"))().setAllowCrossPageTransition(!0).setURI("/friends/requests/log_impressions").setData({ids:a.join(","),ref:"jewel"}).send()}b("DOMQuery").scry(this.$1,"a.findFriendsLink").forEach(function(a){b("Focus").set(a)});c&&b("ScrollableArea").poke(c);b("JewelQPLogging").onJewelOpened()};c.closeHandler=function(){b("Arbiter").inform("requestsJewel/closed"),b("DOMQuery").scry(this.$1,"li.jewelItemNew").forEach(function(a){b("CSS").removeClass(a,"jewelItemNew")}),b("DOMQuery").scry(this.$1,"span.highlightedExpireText").forEach(function(a){b("CSS").removeClass(a,"highlightedExpireText")})};c.setupScroll=function(){var a=this.$22();a&&(this.$7=this.$24(),this.$3=0,b("ScrollableArea").getInstance(a).subscribe("scroll",this.$25.bind(this)),this.$26(),this.$27())};c.$17=function(){b("Event").listen(this.$1,"submit",function(a){a=b("Parent").byClass(a.getTarget(),"objectListItem");a&&(b("CSS").removeClass(a,"jewelItemNew"),b("CSS").addClass(a,"jewelItemResponded"))})};c.$18=function(){var a=this;b("Event").listen(window,"resize",b("throttle").acrossTransitions(function(){a.updateHeight()}))};c.$19=function(){var a=this;b("Arbiter").subscribe("pymk-x-out",function(b,c){b=c.location;(b==="pymk_jewel_first_page"||b==="pymk_jewel")&&a.$26()})};c.$28=function(a){a=parseInt(a,10);return isNaN(a)?null:a};c.$20=function(a){a=a.match(/^(\d+)_(\d+)/);return!a?null:{requester:this.$28(a[1]),type:this.$28(a[2])}};c.$29=function(a,b){return a==null||b==null?null:a+"_"+b};c.$30=function(a,b){return a==null||b==null?null:a+"_"+b+"_req"};a.$31=function(a){a=a.getAttribute("id");return a.substring(0,a.length-6)};c.$22=function(){return b("DOMQuery").scry(this.$1,".uiScrollableArea")[0]};c.$24=function(){return b("DOMQuery").scry(this.$1,".uiScrollableAreaWrap")[0]};c.$25=function(){__p&&__p();var a=b("DOMQuery").scry(this.$7,".uiMorePager").pop();if(a){var c=b("getElementPosition")(a).y,d=this.$22();c>0&&d&&b("CSS").addClass(d,"contentAfter");c=b("DOMQuery").find(a,"a");if(!c)return;d=b("getElementPosition")(c).y;if(d===this.$3)return;a=b("getElementPosition")(this.$7);a=a.y+a.height;if(d-3000){this.$3=d;a=c.getAttribute("ajaxify");a?new(b("AsyncRequest"))(a).setRelativeTo(c).setStatusElement(b("Parent").byClass(c,"stat_elem")).send():h&&h.getInstance("jewel").showMore()}}this.$26();this.$27()};c.$26=function(){__p&&__p();if(!this.$7)return;var a=b("getElementPosition")(this.$7);a=a.y+a.height;var c=b("DOMQuery").scry(this.$1,"li.friendBrowserListUnit"),d=c.length-1;while(d>this.$4){var e=b("getElementPosition")(c[d]),f=e.y;e=f+e.height;if(f>0&&e<=a)break;d-=1}f=d;while(d>this.$4)b("WebFriendingRequests").logPYMKImpression(c[d],"pymk_jewel"),d--;this.$4=Math.max(this.$4,f)};c.$27=function(){__p&&__p();if(!this.$7)return;var c=b("getElementPosition")(this.$7);c=c.y+c.height;var d=b("DOMQuery").scry(this.$1,"li.objectListItem"),e=d.length-1;while(e>this.$5){var f=b("getElementPosition")(d[e]),g=f.y;f=g+f.height;if(g>0&&f<=c)break;e-=1}g=e;while(e>this.$5){f=a.$31(d[e]);b("MarauderLogger").log("request_seen","friend_request_waterfall",{request_id:f,request_location:"requests_jewel"});b("FriendRequestIHEventLogger").logImpression(f);e-=1}this.$5=Math.max(this.$5,g)};c.$12=function(a){a===void 0&&(a={}),this.$10=new(b("Promise"))(function(c,d){var e=!b("ge")("fbRequestsJewelLoading");new(b("AsyncRequest"))().setURI("/ajax/requests/loader/").setData(babelHelpers["extends"]({},a,{reloadcontent:e})).setFinallyHandler(function(a){!a.getError()?c(!0):d()}).send()})};c.$14=function(){if(this.$2())return;this.$8()};c.$13=function(a,b){a=b.shouldReplace;b=b.previousType;if(!a&&(b||this.$2()))return;this.$8()};c.$15=function(a,c){a=c.requester;c=c.type;if(this.$2()||b("ge")("fbRequestsJewelLoading")!=null)return;var d=this.$29(a,c),e=d&&b("ge")(d);e||(d=this.$30(a,c),e=b("ge")(d));e&&(b("CSS").hasClass(e,"jewelItemNew")&&b("RequestsJewelStore").decrementCount(),b("CSS").hasClass(e,"jewelItemResponded")||(b("DOM").remove(e),b("RequestsJewelStore").removeRequest(a),this.$21()))};c.$16=function(a,b){if(b!==!0&&this.$2())return;this.$8()};c.$21=function(){b("DOMQuery").scry(this.$1,"li.empty").forEach(function(a){b("CSS").conditionShow(a,b("RequestsJewelStore").getRequestCount()<=0)})};c.$23=function(){return Math.min(Math.max(b("getViewportDimensions")().height-l,k),j)+i};return a}();a.$11=null;e.exports=a}),null); __d("WaterfallMessageLifetimeTypedLogger",["Banzai","GeneratedLoggerUtils","nullthrows"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1={}}var c=a.prototype;c.log=function(){b("GeneratedLoggerUtils").log("logger:WaterfallMessageLifetimeLoggerConfig",this.$1,b("Banzai").BASIC)};c.logVital=function(){b("GeneratedLoggerUtils").log("logger:WaterfallMessageLifetimeLoggerConfig",this.$1,b("Banzai").VITAL)};c.logImmediately=function(){b("GeneratedLoggerUtils").log("logger:WaterfallMessageLifetimeLoggerConfig",this.$1,{signal:!0})};c.clear=function(){this.$1={};return this};c.getData=function(){return babelHelpers["extends"]({},this.$1)};c.updateData=function(a){this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.setAttemptID=function(a){this.$1.attempt_id=a;return this};c.setDestService=function(a){this.$1.dest_service=a;return this};c.setDeviceID=function(a){this.$1.device_id=a;return this};c.setEventType=function(a){this.$1.event_type=a;return this};c.setIsBatch=function(a){this.$1.is_batch=a;return this};c.setIsGroup=function(a){this.$1.is_group=a;return this};c.setMessageID=function(a){this.$1.message_id=a;return this};c.setOfflineThreadingID=function(a){this.$1.offline_threading_id=a;return this};c.setPageID=function(a){this.$1.page_id=a;return this};c.setPushNotifID=function(a){this.$1.push_notif_id=a;return this};c.setReceiptID=function(a){this.$1.receipt_id=a;return this};c.setSenderID=function(a){this.$1.sender_id=a;return this};c.setServiceName=function(a){this.$1.service_name=a;return this};c.setSrcService=function(a){this.$1.src_service=a;return this};c.setThreadID=function(a){this.$1.thread_id=a;return this};c.setTime=function(a){this.$1.time=a;return this};c.setTimeStamp=function(a){this.$1.time_stamp=a;return this};c.setTopic=function(a){this.$1.topic=a;return this};c.setWeight=function(a){this.$1.weight=a;return this};c.updateExtraData=function(a){a=b("nullthrows")(b("GeneratedLoggerUtils").serializeMap(a));b("GeneratedLoggerUtils").checkExtraDataFieldNames(a,g);this.$1=babelHelpers["extends"]({},this.$1,a);return this};c.addToExtraData=function(a,b){var c={};c[a]=b;return this.updateExtraData(c)};return a}();var g={attempt_id:!0,dest_service:!0,device_id:!0,event_type:!0,is_batch:!0,is_group:!0,message_id:!0,offline_threading_id:!0,page_id:!0,push_notif_id:!0,receipt_id:!0,sender_id:!0,service_name:!0,src_service:!0,thread_id:!0,time:!0,time_stamp:!0,topic:!0,weight:!0};e.exports=a}),null); __d("FantaTabsEagerBootloader",["Bootloader","emptyFunction","ifRequired"],(function(a,b,c,d,e,f){"use strict";var g=function(a){b("ifRequired")("FantaAppStore",function(b){return b.addReducers(a)}),g=b("emptyFunction")};a={bootload:function(){b("ifRequired")("FantaTabsSlimApp",function(a){a.silentPumpUp()}),b("Bootloader").loadModules(["FantaReducersGetMessages","FantaTabsReactApp","MessengerGraphQLThreadFetcher.bs"],function(a){g(a)},"FantaTabsEagerBootloader")}};e.exports=a}),null); __d("MercurySyncResnapshot",["Promise","Bootloader","MercurySingletonProvider"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(a){this.$2=a}a.getForFBID=function(a){return g.getForFBID(a)};a.get=function(){return g.get()};var c=a.prototype;c.resnapshot=function(){var a=this;this.$1||(this.$1=new(b("Promise"))(function(c,d){b("Bootloader").loadModules(["MercurySyncDeltaHandler"],function(b){b.getForFBID(a.$2).emergencyDFF(function(b){c(b),a.$1=null},function(){d(),a.$1=null})},"MercurySyncResnapshot")}));return this.$1};return a}();var g=new(b("MercurySingletonProvider"))(a);e.exports=a}),null); __d("MessageWaterfallLogger",["MqttEnv","WaterfallMessageLifetimeTypedLogger"],(function(a,b,c,d,e,f){"use strict";var g=b("MqttEnv").Env,h=b("MqttEnv").MqttGkNames;a={logNewMessageToWaterfall:function(a){var c=a.senderID,d=a.receiptID,e=a.messageID,f=a.offlineThreadingID,i=a.threadID,j=a.irisSeqId;a=a.isGroup;if(!g.genGk(h.mqtt_waterfall_log_client_sampling))return;new(b("WaterfallMessageLifetimeTypedLogger"))().setEventType("message_receive_ws").setSrcService("mqtt").setDestService("webclient").setSenderID(c).setReceiptID(d).setMessageID(e).setOfflineThreadingID(f).setThreadID(i).setIsGroup(a?1:0).addToExtraData("sync_seq_id",j).log()}};e.exports=a}),null); __d("MessengerMQTTPayloadPreprocessor",[],(function(a,b,c,d,e,f){"use strict";a={process:function(a,b,c){var d=parseInt(c.irisSeqId.toString(),10);return{seqID:d,obj:{queue:a,iseq:d,delta:c,seqID:d,type:b}}}};e.exports=a}),null); __d("MessengerMQTTPresence",["BanzaiODS","FBMqttChannel","PresenceStatus","gkx"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="/orca_presence",h="mqtt_web.presence",i="/send_additional_contacts",j=!1;a={subscribe:function(){if(j)return;j=!0;b("FBMqttChannel").subscribe(g,function(a){a=JSON.parse(a);a&&a.list&&(b("gkx")("983392")&&a.list_type&&a.list_type==="full"&&b("PresenceStatus").reset(),b("PresenceStatus").setMultiFromMQTT(a.list),b("BanzaiODS").bumpEntityKey(2966,h,"buddylist.event"),b("BanzaiODS").bumpEntityKey(2966,h,"buddylist.active_buddies",a.list.length))})},unsubscribe:function(){j=!1,b("FBMqttChannel").unsubscribe(g)},sendAdditionalBuddyRequest:function(a){b("FBMqttChannel").publish(i,JSON.stringify({additional_contacts:[a]}))}};e.exports=a}),null); __d("MessengerMQTTPresenceReporting",["BanzaiODS","FBMqttChannel","InstantGamesPresenceProperties","MercuryConfig"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="mqtt_web.presence",h="/foreground_state",i="/set_client_settings",j="/send_endpoint_capabilities",k=16384,l=2097152,m=b("MercuryConfig").idle_limit||18e5;a=b("MercuryConfig").idle_poll_interval||3e5;c=60*1e3;var n=document.hasFocus(),o,p=Date.now(),q=!1;d={init:function(){},reportForegroundState:function(a,c){(n!==a||c)&&(n=a,b("FBMqttChannel").setForegroundState(a),b("FBMqttChannel").publish(h,JSON.stringify({foreground:a})),b("BanzaiODS").bumpEntityKey(2966,g,a?"report.foregrounded":"report.backgrounded"))},reportChatVisibility:function(a){(o===void 0||o!=a)&&(o=a,b("FBMqttChannel").setChatVisibility(a),b("FBMqttChannel").publish(i,JSON.stringify({make_user_available_when_in_foreground:a})),b("BanzaiODS").bumpEntityKey(2966,g,a?"report.chat_visibility.on":"report.chat_visibility.off"))},reportWorkchatDesktopCapability:function(){var a=b("FBMqttChannel").getEndpointCapabilities();a|=k;b("FBMqttChannel").setEndpointCapabilities(a);b("FBMqttChannel").publish(j,JSON.stringify({endpoint_capabilities:a}))},reportInstantGamesPresence:function(a){var c=b("FBMqttChannel").getEndpointCapabilities();a?c|=l:c&=~l;b("FBMqttChannel").setEndpointCapabilities(c);b("FBMqttChannel").publish(j,JSON.stringify({endpoint_capabilities:c}))},onUserActivity:function(){p=Date.now(),e.exports.reportForegroundState(!0,!1)}};window.setInterval(function(){!document.hasFocus()&&Date.now()-p>m&&e.exports.reportForegroundState(!1,!0)},a);window.setInterval(function(){var a=b("InstantGamesPresenceProperties").isActiveGamePresence();q!==a&&(e.exports.reportInstantGamesPresence(a),q=a)},c);e.exports=d}),null); __d("MessengerMQTTPresenceActivity",["CurrentUser","Event","MessengerMQTTPresenceReporting","Run","UserActivity"],(function(a,b,c,d,e,f){a={init:function(){b("Event").listen(window,"focus",function(){b("MessengerMQTTPresenceReporting").onUserActivity()}),b("Event").listen(window,"blur",function(){b("MessengerMQTTPresenceReporting").reportForegroundState(!1,!1)}),b("Run").onBeforeUnload(function(){b("MessengerMQTTPresenceReporting").reportForegroundState(!1,!0)},!1),b("UserActivity").subscribe(function(){b("MessengerMQTTPresenceReporting").onUserActivity()}),b("CurrentUser").isWorkUser()&&d(["WorkplaceChatHelper"],function(a){a.isDesktopChatApp()&&b("MessengerMQTTPresenceReporting").reportWorkchatDesktopCapability()})}};e.exports=a}),null); __d("MessengerMQTTTypingDataPreProcessor",[],(function(a,b,c,d,e,f){"use strict";a={process:function(a,b){var c=b.thread;a=c==null?{from:b.sender_fbid,st:b.state,to:a,type:"typ"}:{from:b.sender_fbid,st:b.state,thread:c,thread_fbid:c,type:"ttyp"};return{obj:a}}};e.exports=a}),null); __d("SyncProtocolClient",["Int64","MercurySingletonProvider","MqttEnv","SyncProtocolConstants","exponentialBackoff"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("MqttEnv").Env;a=function(){__p&&__p();a.getForFBID=function(a){return h.getForFBID(a)};function a(a){var c=this;this.$1=a;this.$2=[];this.$5=g.getLoggerInstance();this.$10=new(b("exponentialBackoff"))(function(){return c.$11()},this)}var c=a.prototype;c.getPublishMessages=function(){return this.$12()};c.init=function(a,c,d,e){__p&&__p();var f=this;if(!c&&!e){this.$5.bumpCounter("sp_init_invalid_parameter");return this}this.$9=a;this.$8=!0;this.$3=c?b("Int64").fromString(c):null;this.$6=d;this.$7=e;this.$4=null;this.$9.subscribe("/t_ms",function(a){return f.$13(a)});this.$9.subscribe("/thread_typing",function(a){f.$14(a)});this.$9.subscribe("/orca_typing_notifications",function(a){f.$14(a)});this.$9.subscribe("/notify_disconnect",function(a){return f.$15(a)});this.connectToIris();return this};c.connectToIris=function(a){a===void 0&&(a=null),a!==null&&(this.$3=b("Int64").fromString(a)),this.$8=!0,this.$9.registerExtraConnectPayloadProvider(this)};c.$12=function(){__p&&__p();var a;if(this.$4){if(!this.$3){this.$5.bumpCounter("connect_payload_iris_no_seq_id");return[]}a=this.$16()}else a=this.$17();this.$5.debugTrace("Sending request with MQTT Connect",JSON.stringify({topic:a.topic,payload:a.payload}));return[a]};c.$11=function(){__p&&__p();var a;if(this.$4){if(!this.$3){this.$5.bumpCounter("subscribe_to_iris_no_seq_id");return}a=this.$16()}else a=this.$17();this.$5.debugTrace("Sending request",JSON.stringify({topic:a.topic,payload:a.payload}));this.$9.publish(a.topic,a.payload,{qos:1,skipBuffer:!0})};c.$18=function(a){var b=null;try{b=JSON.parse(a)}catch(a){this.$5.logError(a,"Unable to process data")}return b};c.$14=function(a){var b=this.$18(a);if(b==null){this.$5.logWarn("_processTypingData","Unable to process typing data");return}this.$2.forEach(function(a){typeof a.onTypingReceived==="function"&&a.onTypingReceived(b)})};c.addDeltaStreamListener=function(a){this.$2.push(a)};c.$15=function(a){this.$5.logWarn("_handleNotifyDisconnect","Disconnecting reason: "+a),this.$5.bumpCounter("notify_disconnect_"+a),a===b("SyncProtocolConstants").IRIS_CURSOR_LIMIT&&this.$19(a)};c.$19=function(a){this.$5.bumpCounter(a+"_request"),this.$4=null,this.$8=!1,this.$9.unregisterExtraConnectPayloadProvider(this),this.$2.forEach(function(b){return b.onStreamDisconnect(a)})};c.$13=function(a){a=this.$18(a);if(a==null){this.$5.logWarn("_processDeltas","Unable to process delta");return}var b={syncToken:a.syncToken,entityId:a.queueEntityId,errorCode:a.errorCode,firstSeqId:a.firstDeltaSeqId,lastSeqId:a.lastIssuedSeqId};this.$5.debugTrace("Sync data received",JSON.stringify(b));b=this.$1;a.queueEntityId!=null&&a.queueEntityId!=b?this.$5.bumpCounter("delta_for_other_fbid"):a.syncToken?this.$20(a):a.queueEntityId==null?this.$5.bumpCounter("no_fbid"):a.errorCode?this.$21(a.errorCode):this.$22(a)};c.$21=function(a){this.$5.bumpCounter("iris_queue_error."+a),this.$5.logWarn("_handleIrisError","Recevied an error code from sync protocol "+a),a==="ERROR_QUEUE_TEMPORARY_NOT_AVAILABLE"?this.$10():this.$19(a)};c.$20=function(a){var c=this,d=b("Int64").fromString(a.firstDeltaSeqId.toString());(this.$3===null||this.$3!=null&&!this.$3.equals(d))&&this.$5.bumpCounter("initial_sequence_id_mismatch");this.$4=a.syncToken;this.$3=d;this.$5.debugTrace("Sync token received",JSON.stringify({token:this.$4}));this.$9.subscribeChannelEvents({onMQTTStateChanged:function(a){a==="Connected"&&c.$10.reset()}})};c.$22=function(a){var c=a.deltas,d=this.$3;if(c&&d){var e=b("Int64").fromString(a.firstDeltaSeqId.toString());a=b("Int64").fromString(a.lastIssuedSeqId.toString());e.equals(d.add(b("Int64").ONE))?this.$23(e,a,c):e.compare(d)<0?(this.$5.bumpCounter("delta_batch_in_middle"),a.compare(d)>0&&this.$23(d.add(b("Int64").ONE),a,c)):(this.$5.bumpCounter("missing_deltas_get_diffs"),this.$11())}else this.$5.bumpCounter("process_deltas_invalid_state")};c.$23=function(a,c,d){__p&&__p();a=a;for(var e=0;e1?c-1:0),e=1;e